package com.superm.service;

import com.superm.entity.RelationShip;
import com.superm.entity.RelationShipPoJo;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

public interface RelationShipService {
    List<RelationShip> selectRelationShipLike(RelationShipPoJo relationShipPoJo,Integer pageNo,Integer pageSize);


    /**
     * 查询分类的总条数
     * @param relationShipPoJo
     * @return
     */
    int selectRelationShipCount(RelationShipPoJo relationShipPoJo);


    /**
     * 查询指定分类信息
     * @param relationShipId
     * @return
     */
    RelationShip selectIdRelationShip(Integer relationShipId);


    /**
     * 查询最大的类型
     * @return
     */
    List<RelationShip> selectPidMaxRelationShip();


    /**
     * 修改商品分类信息
     * @param relationShipPoJo
     * @return
     */
    int updateRelationShip(RelationShipPoJo relationShipPoJo);


    /**
     * 修改一级类型信息
     * @param relationShipPoJo
     * @return
     */
    int updateRelationShipOne(RelationShipPoJo relationShipPoJo);


    /**
     * 添加一级分类
     * @param relationShipName
     * @return
     */
    int addRelationShipOne(String relationShipName);

    /**
     * 添加二级分类
     * @param relationShipPoJo
     * @return
     */
    int addRelationShipTow(RelationShipPoJo relationShipPoJo);


    /**
     * 删除分类信息
     * @param relationShipId
     * @return
     */
    int deleteRelationShip(Integer relationShipId);

    /**
     * 根据编号查询所有子
     * @param pid
     * @return
     */
    List<RelationShip> selectPidList(Integer pid);



}
